package com.luke.springcloud.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

public class MyBlockHandler {

    /**方法必须是静态的，因为全局都可以使用
     * 并且参数可以包含BlockException
     * */
    public static String myBlockHandler1(BlockException exception){
        return "myBlockHandler---1";
    }

    public static String myBlockHandler2(@PathVariable Integer id, BlockException exception){
        return "myBlockHandler---2";
    }

}
